package cn.xuqiudong.sso.common.model;

import java.io.Serializable;

/**
 * 描述:
 *     SSO查询到的用户信息，保存极少的信息
 *     sso_user
 * @author Vic.xu
 * @since 2021-10-29 17:40
 */

public class SsoUser implements Serializable {
    /*

CREATE TABLE `sso_user` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `username` varchar(64) DEFAULT NULL COMMENT '用户名',
  `password` varchar(128) DEFAULT NULL COMMENT '密码',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `group` varchar(64) DEFAULT NULL COMMENT '所属组',
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_username_group_key` (`username`,`group`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='sso用户表'

 */

    private static final long serialVersionUID = 1L;

    private String id;

    private String username;

    private String password;

    /**
     * 所属组，不同的组内的username是可以重复的
     */
    private String group;



    public SsoUser() {
    }

    public SsoUser(String id, String username) {
        this.id = id;
        this.username = username;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }
}
